<template>
  <div class="wrap">
    <input type="text" class="form-control" v-model="value">
    <button class="btn" type="button" @click="handleAdd">添加</button>
  </div>
</template>


<script setup>
import { ref } from 'vue';
import emitter from './mit'

const value = ref('')

const handleAdd = () => {
  emitter.emit('add', value.value)
  value.value = ''
}
</script>

<style>

</style>